<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: HistoryData.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_history_data_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">HistoryData.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">* Copyright (c) 2013-16, Freescale Semiconductor, Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">* All rights reserved.</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">*</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">* Redistribution and use in source and binary forms, with or without modification,</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">* are permitted provided that the following conditions are met:</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">*</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">* o Redistributions of source code must retain the above copyright notice, this list</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">*   of conditions and the following disclaimer.</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">*</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">* o Redistributions in binary form must reproduce the above copyright notice, this</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">*   list of conditions and the following disclaimer in the documentation and/or</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">*   other materials provided with the distribution.</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">*</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">* o Neither the name of Freescale Semiconductor, Inc. nor the names of its</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">*   contributors may be used to endorse or promote products derived from this</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">*   software without specific prior written permission.</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">*</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;cstring&gt;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="class_history_data.html">   39</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_history_data.html">HistoryData</a></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;{</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="class_history_data.html#adee227765f8bd2a0d109bb48980421a9">   43</a></span>&#160;    <a class="code" href="class_history_data.html#adee227765f8bd2a0d109bb48980421a9">HistoryData</a>()</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        : m_currentDevice(-1)</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        , m_currentBaudRate(-1)</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        , m_imageAddress(0){};</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="class_history_data.html#ab9c295fb73e05857049f5262da2c0e99">   49</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="class_history_data.html#ab9c295fb73e05857049f5262da2c0e99">~HistoryData</a>(){};</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676">   52</a></span>&#160;    <span class="keyword">enum</span> <a class="code" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676">FileType</a></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    {</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676aa91bcd0b475c356df74ae5c204e17cb1">   54</a></span>&#160;        <a class="code" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676aa91bcd0b475c356df74ae5c204e17cb1">kBinary</a>,     </div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676ab3e758b8ae0a2d8ae5b47deb3989ede0">   55</a></span>&#160;        <a class="code" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676ab3e758b8ae0a2d8ae5b47deb3989ede0">kSBFile</a>,     </div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676abcba5b4904ffbd927dcd2a903ef4c89e">   56</a></span>&#160;        <a class="code" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676abcba5b4904ffbd927dcd2a903ef4c89e">kIntelHex</a>,   </div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676a4eb305e01f93d28f58c640da90f50c65">   57</a></span>&#160;        <a class="code" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676a4eb305e01f93d28f58c640da90f50c65">kSRecord</a>,    </div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676a554c9dc161b5863d02bbaf6f82ab419d">   58</a></span>&#160;        <a class="code" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676a554c9dc161b5863d02bbaf6f82ab419d">kUnsupported</a> </div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    };</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="class_history_data.html#a5ddee8b31db4d51a0ce612ddf92da134">   65</a></span>&#160;    int32_t <a class="code" href="class_history_data.html#a5ddee8b31db4d51a0ce612ddf92da134">GetCurrentDevice</a>() { <span class="keywordflow">return</span> m_currentDevice; };</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="class_history_data.html#ae64dcc8017775ebdbb3058118ee1da84">   69</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#ae64dcc8017775ebdbb3058118ee1da84">SetCurrentDevice</a>(int32_t index) { m_currentDevice = index; };</div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="class_history_data.html#a28b99dbdc231215340f1847d8b220713">   75</a></span>&#160;    int32_t <a class="code" href="class_history_data.html#a28b99dbdc231215340f1847d8b220713">GetBaudRate</a>(<span class="keywordtype">size_t</span> index) { <span class="keywordflow">return</span> m_baudRate.at(index); };</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="class_history_data.html#a021225f0f29a086ed1db4723d18012e7">   79</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="class_history_data.html#a021225f0f29a086ed1db4723d18012e7">GetBaudRateCount</a>() { <span class="keywordflow">return</span> m_baudRate.size(); };</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="class_history_data.html#abbc0c66277b6db10082ea46d19f810cf">   84</a></span>&#160;    int32_t <a class="code" href="class_history_data.html#abbc0c66277b6db10082ea46d19f810cf">GetCurrentBaudRate</a>() { <span class="keywordflow">return</span> m_currentBaudRate; };</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="class_history_data.html#acf5edb2c8001636d683cf7124aab4abc">   88</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#acf5edb2c8001636d683cf7124aab4abc">SetCurrentBaudRate</a>(int32_t index) { m_currentBaudRate = index; };</div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_history_data.html#ac8f3dcccab9d1cd4dd6b1e65807ad421">   92</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#ac8f3dcccab9d1cd4dd6b1e65807ad421">AddBaudRate</a>(int32_t baudrate)</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    {</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <span class="comment">// Find whether the new baudrate already exists in the list</span></div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="keywordflow">for</span> (std::vector&lt;int32_t&gt;::iterator it = m_baudRate.begin(); it != m_baudRate.end(); it++)</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        {</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;            <span class="comment">// If find the matched baud rate, return.</span></div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;            <span class="keywordflow">if</span> (baudrate == *it)</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            {</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                <span class="keywordflow">return</span>;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;            }</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        }</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <span class="comment">// If no matched, add it to end of list.</span></div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        m_baudRate.push_back(baudrate);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    };</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="class_history_data.html#a45936619ec2586556f5769e7c78557d8">  111</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#a45936619ec2586556f5769e7c78557d8">InsertBaudRate</a>(int32_t baudrate)</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    {</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <span class="comment">// If find index of the baud rate to insert.</span></div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <span class="keywordflow">for</span> (std::vector&lt;int32_t&gt;::iterator it = m_baudRate.begin(); it != m_baudRate.end(); it++)</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        {</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;            <span class="comment">// Check next index.</span></div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;            <span class="keywordflow">if</span> (baudrate &gt; *it)</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            {</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;            }</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;            <span class="comment">// The same baudrate in the list, just set it as current selected baud rate.</span></div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (baudrate == *it)</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            {</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;                <a class="code" href="class_history_data.html#acf5edb2c8001636d683cf7124aab4abc">SetCurrentBaudRate</a>(it - m_baudRate.begin());</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                <span class="keywordflow">return</span>;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;            }</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            <span class="comment">// Find the correct index, insert it and set it as current selected baud rate.</span></div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;            <span class="keywordflow">else</span></div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            {</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;                m_baudRate.insert(it, baudrate);</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;                <a class="code" href="class_history_data.html#acf5edb2c8001636d683cf7124aab4abc">SetCurrentBaudRate</a>(it - m_baudRate.begin());</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;                <span class="keywordflow">return</span>;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            }</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        }</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <span class="comment">// If baudrate is bigger than any one in the list, add it to list back.</span></div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        m_baudRate.push_back(baudrate);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <a class="code" href="class_history_data.html#acf5edb2c8001636d683cf7124aab4abc">SetCurrentBaudRate</a>(<a class="code" href="class_history_data.html#a021225f0f29a086ed1db4723d18012e7">GetBaudRateCount</a>());</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <span class="keywordflow">return</span>;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    };</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="class_history_data.html#aa4c84cb6b8011c2050fc4dbda0ef0931">  146</a></span>&#160;    uint16_t <a class="code" href="class_history_data.html#aa4c84cb6b8011c2050fc4dbda0ef0931">GetVid</a>(<span class="keywordtype">size_t</span> index) { <span class="keywordflow">return</span> m_vids.at(index); };</div><div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="class_history_data.html#ae0afd6e335cc626c7bd741ac536ee3f8">  150</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="class_history_data.html#ae0afd6e335cc626c7bd741ac536ee3f8">GetVidCount</a>() { <span class="keywordflow">return</span> m_vids.size(); };</div><div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="class_history_data.html#abc88ddc05a3659704c18c4a9c909149f">  154</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#abc88ddc05a3659704c18c4a9c909149f">AddVid</a>(uint16_t vid)</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    {</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <span class="comment">// Find whether the new vid already exists in the list.</span></div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="keywordflow">for</span> (std::vector&lt;uint16_t&gt;::iterator it = m_vids.begin(); it != m_vids.end(); it++)</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        {</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;            <span class="comment">// If find the matched vid, return.</span></div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;            <span class="keywordflow">if</span> (vid == *it)</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;            {</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;                <span class="keywordflow">return</span>;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;            }</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        }</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        <span class="comment">// If no matched, add it to end of list.</span></div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        m_vids.push_back(vid);</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    };</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="class_history_data.html#a43e3f8e53aa7102d0d37b7d73c2abe67">  173</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#a43e3f8e53aa7102d0d37b7d73c2abe67">InsertVid</a>(uint16_t vid)</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    {</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <span class="comment">// Find whether the new vid already exists in the list.</span></div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordflow">for</span> (std::vector&lt;uint16_t&gt;::iterator it = m_vids.begin(); it != m_vids.end(); it++)</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        {</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;            <span class="comment">// If find the matched vid, bubble it to the head of list. Then return.</span></div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;            <span class="keywordflow">if</span> (vid == *it)</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            {</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;                <a class="code" href="class_history_data.html#a5ae11c94cbb3bdaef323abd974fc53e7">BubbleSelectedVid</a>(it - m_vids.begin());</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;                <span class="keywordflow">return</span>;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;            }</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        }</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="comment">// If no matched, add it to head of list.</span></div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        m_vids.insert(m_vids.begin(), vid);</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    };</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;</div><div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="class_history_data.html#a5ae11c94cbb3bdaef323abd974fc53e7">  192</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#a5ae11c94cbb3bdaef323abd974fc53e7">BubbleSelectedVid</a>(<span class="keywordtype">size_t</span> index)</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    {</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        uint16_t vid = m_vids.at(index);</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        m_vids.erase(m_vids.begin() + index);</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        m_vids.insert(m_vids.begin(), vid);</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    }</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="class_history_data.html#a56acc8b8f856a48ddff960df036a5a6f">  204</a></span>&#160;    uint16_t <a class="code" href="class_history_data.html#a56acc8b8f856a48ddff960df036a5a6f">GetPid</a>(<span class="keywordtype">size_t</span> index) { <span class="keywordflow">return</span> m_pids.at(index); };</div><div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="class_history_data.html#ae8039b7bf43e392c81d6005ad0ef2cb4">  208</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="class_history_data.html#ae8039b7bf43e392c81d6005ad0ef2cb4">GetPidCount</a>() { <span class="keywordflow">return</span> m_pids.size(); };</div><div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="class_history_data.html#a1fec5206e566acedfd5312345a93807e">  212</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#a1fec5206e566acedfd5312345a93807e">AddPid</a>(uint16_t pid)</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    {</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        <span class="comment">// Find whether the new pid already exists in the list.</span></div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;        <span class="keywordflow">for</span> (std::vector&lt;uint16_t&gt;::iterator it = m_pids.begin(); it != m_pids.end(); it++)</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        {</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;            <span class="comment">// If find the matched pid, return.</span></div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;            <span class="keywordflow">if</span> (pid == *it)</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;            {</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;                <span class="keywordflow">return</span>;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;            }</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        }</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        <span class="comment">// If no matched, add it to end of list.</span></div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;        m_pids.push_back(pid);</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    };</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;</div><div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="class_history_data.html#a73cd3674d1c8dfbe1ea74146840eb469">  231</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#a73cd3674d1c8dfbe1ea74146840eb469">InsertPid</a>(uint16_t pid)</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    {</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        <span class="comment">// Find whether the new pid already exists in the list.</span></div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        <span class="keywordflow">for</span> (std::vector&lt;uint16_t&gt;::iterator it = m_pids.begin(); it != m_pids.end(); it++)</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        {</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;            <span class="comment">// If find the matched pid, bubble it to the head of list. Then return.</span></div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;            <span class="keywordflow">if</span> (pid == *it)</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;            {</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;                <a class="code" href="class_history_data.html#ad02b7f5d58ee539546907d8a0c192c11">BubbleSelectedPid</a>(it - m_pids.begin());</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;                <span class="keywordflow">return</span>;</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;            }</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        }</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        <span class="comment">// If no matched, add it to head of list.</span></div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        m_pids.insert(m_pids.begin(), pid);</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    };</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno"><a class="line" href="class_history_data.html#ad02b7f5d58ee539546907d8a0c192c11">  250</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#ad02b7f5d58ee539546907d8a0c192c11">BubbleSelectedPid</a>(<span class="keywordtype">size_t</span> index)</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    {</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        uint16_t pid = m_pids.at(index);</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        m_pids.erase(m_pids.begin() + index);</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        m_pids.insert(m_pids.begin(), pid);</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    }</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;</div><div class="line"><a name="l00262"></a><span class="lineno"><a class="line" href="class_history_data.html#a6cf453a912b95a2aeae859e561997388">  262</a></span>&#160;    CString <a class="code" href="class_history_data.html#a6cf453a912b95a2aeae859e561997388">GetFilePath</a>(<span class="keywordtype">int</span> index) { <span class="keywordflow">return</span> m_imageFile.at(index); };</div><div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="class_history_data.html#a26ab30f07e46c7c24f81ff26e4cf5e70">  268</a></span>&#160;    CString <a class="code" href="class_history_data.html#a26ab30f07e46c7c24f81ff26e4cf5e70">GetFileName</a>(<span class="keywordtype">int</span> index)</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    {</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        CString fullPath = m_imageFile.at(index);</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        <span class="keywordtype">int</span> pos = fullPath.ReverseFind(_T(<span class="charliteral">&#39;\\&#39;</span>));</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        <span class="keywordflow">return</span> fullPath.Right(fullPath.GetLength() - pos - 1);</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    };</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;</div><div class="line"><a name="l00280"></a><span class="lineno"><a class="line" href="class_history_data.html#a0da6841f32f24a1c82d04958a8c39487">  280</a></span>&#160;    <a class="code" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676">FileType</a> <a class="code" href="class_history_data.html#a0da6841f32f24a1c82d04958a8c39487">GetFileType</a>(<span class="keywordtype">int</span> index)</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    {</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        CString extension = PathFindExtension(m_imageFile.at(index));</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        <span class="keywordflow">if</span> (extension.CompareNoCase(_T(<span class="stringliteral">&quot;.bin&quot;</span>)) == 0)</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        {</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676aa91bcd0b475c356df74ae5c204e17cb1">kBinary</a>;</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;        }</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (extension.CompareNoCase(_T(<span class="stringliteral">&quot;.sb&quot;</span>)) == 0)</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        {</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676ab3e758b8ae0a2d8ae5b47deb3989ede0">kSBFile</a>;</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;        }</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (extension.CompareNoCase(_T(<span class="stringliteral">&quot;.hex&quot;</span>)) == 0)</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;        {</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676abcba5b4904ffbd927dcd2a903ef4c89e">kIntelHex</a>;</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;        }</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((extension.CompareNoCase(_T(<span class="stringliteral">&quot;.srec&quot;</span>)) == 0) || (extension.CompareNoCase(_T(<span class="stringliteral">&quot;.s19&quot;</span>)) == 0))</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;        {</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676a4eb305e01f93d28f58c640da90f50c65">kSRecord</a>;</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;        }</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        {</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676a554c9dc161b5863d02bbaf6f82ab419d">kUnsupported</a>;</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;        }</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    }</div><div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="class_history_data.html#a97d10f780f465262dd6050bb7986badc">  307</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="class_history_data.html#a97d10f780f465262dd6050bb7986badc">GetFileCount</a>() { <span class="keywordflow">return</span> m_imageFile.size(); };</div><div class="line"><a name="l00311"></a><span class="lineno"><a class="line" href="class_history_data.html#abf8ea55078aefd8086467b9066c495c0">  311</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#abf8ea55078aefd8086467b9066c495c0">AddFile</a>(CString fullPath)</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;    {</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;        <span class="comment">// Find whether this file already exists in the file list.</span></div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;        <span class="keywordflow">for</span> (std::vector&lt;CString&gt;::iterator it = m_imageFile.begin(); it != m_imageFile.end(); it++)</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;        {</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;            <span class="comment">// If find the matched file, return.</span></div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;            <span class="keywordflow">if</span> (fullPath.Compare(*it) == 0)</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;            {</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;                <span class="keywordflow">return</span>;</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;            }</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        }</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;        <span class="comment">// If no matched file, add it to end of file list.</span></div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;        m_imageFile.push_back(fullPath);</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;    };</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;</div><div class="line"><a name="l00330"></a><span class="lineno"><a class="line" href="class_history_data.html#acfcdc043403b445f6f64d0744dbf54f8">  330</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#acfcdc043403b445f6f64d0744dbf54f8">InsertFile</a>(CString fullPath)</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;    {</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;        <span class="comment">// Find whether this file already exists in the file list.</span></div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;        <span class="keywordflow">for</span> (std::vector&lt;CString&gt;::iterator it = m_imageFile.begin(); it != m_imageFile.end(); it++)</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;        {</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;            <span class="comment">// If find the matched file, bubble it to the head of file list. Then return.</span></div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;            <span class="keywordflow">if</span> (fullPath.Compare(*it) == 0)</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;            {</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;                <a class="code" href="class_history_data.html#aa991d61a89792685d3f9bc83d8889e0e">BubbleSelectedFile</a>(it - m_imageFile.begin());</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;                <span class="keywordflow">return</span>;</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;            }</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;        }</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        <span class="comment">// If no matched file, add it to head of file list.</span></div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;        m_imageFile.insert(m_imageFile.begin(), fullPath);</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    };</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;</div><div class="line"><a name="l00349"></a><span class="lineno"><a class="line" href="class_history_data.html#aa991d61a89792685d3f9bc83d8889e0e">  349</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#aa991d61a89792685d3f9bc83d8889e0e">BubbleSelectedFile</a>(int32_t index)</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    {</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;        CString file = m_imageFile.at(index);</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;        m_imageFile.erase(m_imageFile.begin() + index);</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;        m_imageFile.insert(m_imageFile.begin(), file);</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;    }</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;</div><div class="line"><a name="l00359"></a><span class="lineno"><a class="line" href="class_history_data.html#a23f045aea4c74f9d18e2069b683842b2">  359</a></span>&#160;    uint32_t <a class="code" href="class_history_data.html#a23f045aea4c74f9d18e2069b683842b2">GetImageAddress</a>() { <span class="keywordflow">return</span> m_imageAddress; };</div><div class="line"><a name="l00363"></a><span class="lineno"><a class="line" href="class_history_data.html#a59c46e8a9dae209fdaa826aaba33431e">  363</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#a59c46e8a9dae209fdaa826aaba33431e">SetImageAddress</a>(uint32_t imageAddress) { m_imageAddress = imageAddress; };</div><div class="line"><a name="l00367"></a><span class="lineno"><a class="line" href="class_history_data.html#afd00ed69eab94b42b398c7908a86a2fd">  367</a></span>&#160;    CString <a class="code" href="class_history_data.html#afd00ed69eab94b42b398c7908a86a2fd">GetBackdoorKey</a>() { <span class="keywordflow">return</span> m_backdoorKey; }</div><div class="line"><a name="l00371"></a><span class="lineno"><a class="line" href="class_history_data.html#a0e5691a862ac9c1e6bd5c81d15f7e32e">  371</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_history_data.html#a0e5691a862ac9c1e6bd5c81d15f7e32e">SetBackdoorKey</a>(CString backdoorKey) { m_backdoorKey = backdoorKey; };</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    int32_t m_currentDevice;          </div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;    std::vector&lt;int32_t&gt; m_baudRate;  </div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;    int32_t m_currentBaudRate;        </div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;    std::vector&lt;uint16_t&gt; m_vids;     </div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;    std::vector&lt;uint16_t&gt; m_pids;     </div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;    std::vector&lt;CString&gt; m_imageFile; </div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    uint32_t m_imageAddress;          </div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;    CString m_backdoorKey;            </div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;};</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;<span class="keyword">extern</span> <a class="code" href="class_history_data.html">HistoryData</a> *g_pHistoryData; <span class="comment">//!&lt; Global point to HistoryData class.</span></div><div class="ttc" id="class_history_data_html_ab9c295fb73e05857049f5262da2c0e99"><div class="ttname"><a href="class_history_data.html#ab9c295fb73e05857049f5262da2c0e99">HistoryData::~HistoryData</a></div><div class="ttdeci">virtual ~HistoryData()</div><div class="ttdoc">Generated standard destructor. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:49</div></div>
<div class="ttc" id="class_history_data_html_a5ae11c94cbb3bdaef323abd974fc53e7"><div class="ttname"><a href="class_history_data.html#a5ae11c94cbb3bdaef323abd974fc53e7">HistoryData::BubbleSelectedVid</a></div><div class="ttdeci">void BubbleSelectedVid(size_t index)</div><div class="ttdoc">bubble the VID at the specified index to the head of the VID list </div><div class="ttdef"><b>Definition:</b> HistoryData.h:192</div></div>
<div class="ttc" id="class_history_data_html_a23f045aea4c74f9d18e2069b683842b2"><div class="ttname"><a href="class_history_data.html#a23f045aea4c74f9d18e2069b683842b2">HistoryData::GetImageAddress</a></div><div class="ttdeci">uint32_t GetImageAddress()</div><div class="ttdoc">Get image address previous used. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:359</div></div>
<div class="ttc" id="class_history_data_html_a5ddee8b31db4d51a0ce612ddf92da134"><div class="ttname"><a href="class_history_data.html#a5ddee8b31db4d51a0ce612ddf92da134">HistoryData::GetCurrentDevice</a></div><div class="ttdeci">int32_t GetCurrentDevice()</div><div class="ttdoc">Get current selected device index at device list. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:65</div></div>
<div class="ttc" id="class_history_data_html_a97d10f780f465262dd6050bb7986badc"><div class="ttname"><a href="class_history_data.html#a97d10f780f465262dd6050bb7986badc">HistoryData::GetFileCount</a></div><div class="ttdeci">size_t GetFileCount()</div><div class="ttdoc">Get count of the files in the list . </div><div class="ttdef"><b>Definition:</b> HistoryData.h:307</div></div>
<div class="ttc" id="class_history_data_html_ad84b3b541102532ce9634a57d6dcc676a554c9dc161b5863d02bbaf6f82ab419d"><div class="ttname"><a href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676a554c9dc161b5863d02bbaf6f82ab419d">HistoryData::kUnsupported</a></div><div class="ttdoc">Unsupported file type. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:58</div></div>
<div class="ttc" id="class_history_data_html"><div class="ttname"><a href="class_history_data.html">HistoryData</a></div><div class="ttdoc">HistoryData class stores the operation history. Save users operation steps. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:39</div></div>
<div class="ttc" id="class_history_data_html_ad84b3b541102532ce9634a57d6dcc676aa91bcd0b475c356df74ae5c204e17cb1"><div class="ttname"><a href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676aa91bcd0b475c356df74ae5c204e17cb1">HistoryData::kBinary</a></div><div class="ttdoc">Binary file.(.bin) </div><div class="ttdef"><b>Definition:</b> HistoryData.h:54</div></div>
<div class="ttc" id="class_history_data_html_adee227765f8bd2a0d109bb48980421a9"><div class="ttname"><a href="class_history_data.html#adee227765f8bd2a0d109bb48980421a9">HistoryData::HistoryData</a></div><div class="ttdeci">HistoryData()</div><div class="ttdoc">Generated standard constructor. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:43</div></div>
<div class="ttc" id="class_history_data_html_ad84b3b541102532ce9634a57d6dcc676abcba5b4904ffbd927dcd2a903ef4c89e"><div class="ttname"><a href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676abcba5b4904ffbd927dcd2a903ef4c89e">HistoryData::kIntelHex</a></div><div class="ttdoc">Intel hex file.(.hex) </div><div class="ttdef"><b>Definition:</b> HistoryData.h:56</div></div>
<div class="ttc" id="class_history_data_html_aa991d61a89792685d3f9bc83d8889e0e"><div class="ttname"><a href="class_history_data.html#aa991d61a89792685d3f9bc83d8889e0e">HistoryData::BubbleSelectedFile</a></div><div class="ttdeci">void BubbleSelectedFile(int32_t index)</div><div class="ttdoc">bubble the file at the specified index to the head of the file list </div><div class="ttdef"><b>Definition:</b> HistoryData.h:349</div></div>
<div class="ttc" id="class_history_data_html_afd00ed69eab94b42b398c7908a86a2fd"><div class="ttname"><a href="class_history_data.html#afd00ed69eab94b42b398c7908a86a2fd">HistoryData::GetBackdoorKey</a></div><div class="ttdeci">CString GetBackdoorKey()</div><div class="ttdoc">Get the string of backdoor key previous used. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:367</div></div>
<div class="ttc" id="class_history_data_html_a56acc8b8f856a48ddff960df036a5a6f"><div class="ttname"><a href="class_history_data.html#a56acc8b8f856a48ddff960df036a5a6f">HistoryData::GetPid</a></div><div class="ttdeci">uint16_t GetPid(size_t index)</div><div class="ttdoc">Get the PID at the specified index. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:204</div></div>
<div class="ttc" id="class_history_data_html_a0e5691a862ac9c1e6bd5c81d15f7e32e"><div class="ttname"><a href="class_history_data.html#a0e5691a862ac9c1e6bd5c81d15f7e32e">HistoryData::SetBackdoorKey</a></div><div class="ttdeci">void SetBackdoorKey(CString backdoorKey)</div><div class="ttdoc">Change the string of backdoor key. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:371</div></div>
<div class="ttc" id="class_history_data_html_a0da6841f32f24a1c82d04958a8c39487"><div class="ttname"><a href="class_history_data.html#a0da6841f32f24a1c82d04958a8c39487">HistoryData::GetFileType</a></div><div class="ttdeci">FileType GetFileType(int index)</div><div class="ttdoc">Get the file type of the file at the specified index of the file list. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:280</div></div>
<div class="ttc" id="class_history_data_html_ad02b7f5d58ee539546907d8a0c192c11"><div class="ttname"><a href="class_history_data.html#ad02b7f5d58ee539546907d8a0c192c11">HistoryData::BubbleSelectedPid</a></div><div class="ttdeci">void BubbleSelectedPid(size_t index)</div><div class="ttdoc">bubble the PID at the specified index to the head of the PID list </div><div class="ttdef"><b>Definition:</b> HistoryData.h:250</div></div>
<div class="ttc" id="class_history_data_html_ae8039b7bf43e392c81d6005ad0ef2cb4"><div class="ttname"><a href="class_history_data.html#ae8039b7bf43e392c81d6005ad0ef2cb4">HistoryData::GetPidCount</a></div><div class="ttdeci">size_t GetPidCount()</div><div class="ttdoc">Get count of the PID in the list . </div><div class="ttdef"><b>Definition:</b> HistoryData.h:208</div></div>
<div class="ttc" id="class_history_data_html_a1fec5206e566acedfd5312345a93807e"><div class="ttname"><a href="class_history_data.html#a1fec5206e566acedfd5312345a93807e">HistoryData::AddPid</a></div><div class="ttdeci">void AddPid(uint16_t pid)</div><div class="ttdoc">Append a new PID at the end of the list. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:212</div></div>
<div class="ttc" id="class_history_data_html_a6cf453a912b95a2aeae859e561997388"><div class="ttname"><a href="class_history_data.html#a6cf453a912b95a2aeae859e561997388">HistoryData::GetFilePath</a></div><div class="ttdeci">CString GetFilePath(int index)</div><div class="ttdoc">Get the file full path at the specified index of the file list. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:262</div></div>
<div class="ttc" id="class_history_data_html_acf5edb2c8001636d683cf7124aab4abc"><div class="ttname"><a href="class_history_data.html#acf5edb2c8001636d683cf7124aab4abc">HistoryData::SetCurrentBaudRate</a></div><div class="ttdeci">void SetCurrentBaudRate(int32_t index)</div><div class="ttdoc">Change the index of current selected baud rate. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:88</div></div>
<div class="ttc" id="class_history_data_html_ad84b3b541102532ce9634a57d6dcc676"><div class="ttname"><a href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676">HistoryData::FileType</a></div><div class="ttdeci">FileType</div><div class="ttdoc">File types. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:52</div></div>
<div class="ttc" id="class_history_data_html_abf8ea55078aefd8086467b9066c495c0"><div class="ttname"><a href="class_history_data.html#abf8ea55078aefd8086467b9066c495c0">HistoryData::AddFile</a></div><div class="ttdeci">void AddFile(CString fullPath)</div><div class="ttdoc">Append a new file at the end of the list. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:311</div></div>
<div class="ttc" id="class_history_data_html_aa4c84cb6b8011c2050fc4dbda0ef0931"><div class="ttname"><a href="class_history_data.html#aa4c84cb6b8011c2050fc4dbda0ef0931">HistoryData::GetVid</a></div><div class="ttdeci">uint16_t GetVid(size_t index)</div><div class="ttdoc">Get the VID at the specified index. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:146</div></div>
<div class="ttc" id="class_history_data_html_acfcdc043403b445f6f64d0744dbf54f8"><div class="ttname"><a href="class_history_data.html#acfcdc043403b445f6f64d0744dbf54f8">HistoryData::InsertFile</a></div><div class="ttdeci">void InsertFile(CString fullPath)</div><div class="ttdoc">Insert a file at the head of the list. If the file already exists in the list, only bubble that file ...</div><div class="ttdef"><b>Definition:</b> HistoryData.h:330</div></div>
<div class="ttc" id="class_history_data_html_a45936619ec2586556f5769e7c78557d8"><div class="ttname"><a href="class_history_data.html#a45936619ec2586556f5769e7c78557d8">HistoryData::InsertBaudRate</a></div><div class="ttdeci">void InsertBaudRate(int32_t baudrate)</div><div class="ttdoc">Insert a new baud rate, and change the current selected baud rate. If the baud rate already exists in...</div><div class="ttdef"><b>Definition:</b> HistoryData.h:111</div></div>
<div class="ttc" id="class_history_data_html_a43e3f8e53aa7102d0d37b7d73c2abe67"><div class="ttname"><a href="class_history_data.html#a43e3f8e53aa7102d0d37b7d73c2abe67">HistoryData::InsertVid</a></div><div class="ttdeci">void InsertVid(uint16_t vid)</div><div class="ttdoc">Insert a VID at the head of the list. If the VID already exists in the list, only bubble that VID to ...</div><div class="ttdef"><b>Definition:</b> HistoryData.h:173</div></div>
<div class="ttc" id="class_history_data_html_a73cd3674d1c8dfbe1ea74146840eb469"><div class="ttname"><a href="class_history_data.html#a73cd3674d1c8dfbe1ea74146840eb469">HistoryData::InsertPid</a></div><div class="ttdeci">void InsertPid(uint16_t pid)</div><div class="ttdoc">Insert a PID at the head of the list. If the PID already exists in the list, only bubble it to list h...</div><div class="ttdef"><b>Definition:</b> HistoryData.h:231</div></div>
<div class="ttc" id="class_history_data_html_a021225f0f29a086ed1db4723d18012e7"><div class="ttname"><a href="class_history_data.html#a021225f0f29a086ed1db4723d18012e7">HistoryData::GetBaudRateCount</a></div><div class="ttdeci">size_t GetBaudRateCount()</div><div class="ttdoc">Get count of the baud rates in the list. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:79</div></div>
<div class="ttc" id="class_history_data_html_ac8f3dcccab9d1cd4dd6b1e65807ad421"><div class="ttname"><a href="class_history_data.html#ac8f3dcccab9d1cd4dd6b1e65807ad421">HistoryData::AddBaudRate</a></div><div class="ttdeci">void AddBaudRate(int32_t baudrate)</div><div class="ttdoc">Append a new baud rate at the end of the list. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:92</div></div>
<div class="ttc" id="class_history_data_html_abbc0c66277b6db10082ea46d19f810cf"><div class="ttname"><a href="class_history_data.html#abbc0c66277b6db10082ea46d19f810cf">HistoryData::GetCurrentBaudRate</a></div><div class="ttdeci">int32_t GetCurrentBaudRate()</div><div class="ttdoc">Get current selected baud rate index at the list. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:84</div></div>
<div class="ttc" id="class_history_data_html_ae0afd6e335cc626c7bd741ac536ee3f8"><div class="ttname"><a href="class_history_data.html#ae0afd6e335cc626c7bd741ac536ee3f8">HistoryData::GetVidCount</a></div><div class="ttdeci">size_t GetVidCount()</div><div class="ttdoc">Get count of the VID in the list . </div><div class="ttdef"><b>Definition:</b> HistoryData.h:150</div></div>
<div class="ttc" id="class_history_data_html_a59c46e8a9dae209fdaa826aaba33431e"><div class="ttname"><a href="class_history_data.html#a59c46e8a9dae209fdaa826aaba33431e">HistoryData::SetImageAddress</a></div><div class="ttdeci">void SetImageAddress(uint32_t imageAddress)</div><div class="ttdoc">Change image address. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:363</div></div>
<div class="ttc" id="class_history_data_html_abc88ddc05a3659704c18c4a9c909149f"><div class="ttname"><a href="class_history_data.html#abc88ddc05a3659704c18c4a9c909149f">HistoryData::AddVid</a></div><div class="ttdeci">void AddVid(uint16_t vid)</div><div class="ttdoc">Append a new VID at the end of the list. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:154</div></div>
<div class="ttc" id="class_history_data_html_ae64dcc8017775ebdbb3058118ee1da84"><div class="ttname"><a href="class_history_data.html#ae64dcc8017775ebdbb3058118ee1da84">HistoryData::SetCurrentDevice</a></div><div class="ttdeci">void SetCurrentDevice(int32_t index)</div><div class="ttdoc">Change the index of current selected device. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:69</div></div>
<div class="ttc" id="class_history_data_html_ad84b3b541102532ce9634a57d6dcc676ab3e758b8ae0a2d8ae5b47deb3989ede0"><div class="ttname"><a href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676ab3e758b8ae0a2d8ae5b47deb3989ede0">HistoryData::kSBFile</a></div><div class="ttdoc">SB file.(.sb) </div><div class="ttdef"><b>Definition:</b> HistoryData.h:55</div></div>
<div class="ttc" id="class_history_data_html_a26ab30f07e46c7c24f81ff26e4cf5e70"><div class="ttname"><a href="class_history_data.html#a26ab30f07e46c7c24f81ff26e4cf5e70">HistoryData::GetFileName</a></div><div class="ttdeci">CString GetFileName(int index)</div><div class="ttdoc">Get the file name at the specified index of the file list. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:268</div></div>
<div class="ttc" id="class_history_data_html_ad84b3b541102532ce9634a57d6dcc676a4eb305e01f93d28f58c640da90f50c65"><div class="ttname"><a href="class_history_data.html#ad84b3b541102532ce9634a57d6dcc676a4eb305e01f93d28f58c640da90f50c65">HistoryData::kSRecord</a></div><div class="ttdoc">Srecord file.(.srec, s19) </div><div class="ttdef"><b>Definition:</b> HistoryData.h:57</div></div>
<div class="ttc" id="class_history_data_html_a28b99dbdc231215340f1847d8b220713"><div class="ttname"><a href="class_history_data.html#a28b99dbdc231215340f1847d8b220713">HistoryData::GetBaudRate</a></div><div class="ttdeci">int32_t GetBaudRate(size_t index)</div><div class="ttdoc">Get the baud rate at the specified index. </div><div class="ttdef"><b>Definition:</b> HistoryData.h:75</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_cb2b6c23fe97b832f25340ae9f48ab23.html">KinetisFlashTool</a></li><li class="navelem"><a class="el" href="dir_db970ff1c86be5545266de782c254ef5.html">KinetisFlashTool</a></li><li class="navelem"><b>HistoryData.h</b></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:50 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
